unit u_threadastar;

interface

uses classes,
     u_engine,
     u_astar;

type

 fred_aster = class(TThread)
  private
    fred : C_Astar;
    finished : boolean;
    depx, depy, arrx, arry, etage : integer;
  public
    procedure execute; override;
    constructor create;
    procedure init(_depx, _depy, _arrx, _arry, _etage : integer);
 end;


implementation

constructor fred_aster.create;
  begin
    inherited create;
    finished := false;
    fred := C_Astar.create;
  end;

procedure fred_aster.Execute;
  begin
    fred.init_sg(depx, depy, arrx, arry, etage,mymesh.taillex,mymesh.tailley, mymesh.map2 );
    finished := true;
  end;

procedure fred_aster.init(_depx, _depy, _arrx, _arry, _etage : integer);
  begin
    depx := _depx;
    depy := _depy;
    arrx := _arrx;
    arry := _arry;
    etage := _etage;
  end;

end.
